package com.allwees.bs.module.wms.rest;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.bs.module.core.rest.BoCrudApi;
import com.allwees.bs.module.wms.entity.WmsPickOrder;
import com.allwees.bs.module.wms.req.PickOrderShippingReq;
import com.allwees.bs.module.wms.req.query.WmsPickOrderQueryReq;
import com.allwees.bs.module.wms.service.WmsPickOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/backstage/api/wms/pick_order")
public class WmsPickOrderApi extends BoCrudApi<WmsPickOrder, WmsPickOrderService> {

    @GetMapping("/page")
    public R page(Page<WmsPickOrder> page, WmsPickOrderQueryReq req) {
        return super.page(page, req);
    }

    @PostMapping("/shipping")
    public R shipping(@RequestBody PickOrderShippingReq req) {
        boService.shipping(req);
        return R.ok();
    }
}
